<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<%
	String  openId = (String)request.getSession().getAttribute("openId");
%>
<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="stylesheet" href="../css/amazeui.min.css">
  <link rel="stylesheet" href="../css/wap.css">
  <link rel="stylesheet" href="../css/style.css"/>
  <link rel="stylesheet" href="../css/weui.css" />
  <title>编写文章</title>
  <script src="../js/jquery.js"></script>
  <script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  <script src="../js/amazeui.min.js"></script>
   <script src="../js/jssdk.js"></script>
</head>
<body style="background:#ececec">
<!--错误提示-->
<div class="weui-toptips weui-toptips_warn js_tooltips"></div>
  <div class="pet_mian" >
  
      <!-- loading toast -->
    <div id="loadingToast" style="display:none;">
		<div class="weui-mask_transparent"></div>
		<div class="weui-toast">
			<i class="weui-loading weui-icon_toast"></i>
			<p class="weui-toast__content">数据加载中</p>
		</div>
	</div>

    <div class="pet_content pet_content_list pet_hd">
      <div class="pet_article_like">
        <div class="pet_content_main pet_article_like_delete">
          <div data-am-widget="list_news" class="am-list-news am-list-news-default am-no-layout">
            <div class="am-list-news-bd">
	      	<form action="${ctx }/expert/insert" method="post" id="form">
	      		 <div class="button-sp-area">
		             <div class="weui-cell weui-cell_select weui-cell_select-after">
		                <div class="weui-cell__hd">
		                    <label for="" class="weui-label">课程名称</label>
		                </div>
		                <div class="weui-cell__bd">
		                    <select class="weui-select" name="expertType">
		                       <c:forEach items="${issueTypeList }" var="issueType">
									 <!-- 判断问题类型是否停用 -->
									<c:if test="${issueType.status==1 }">
										<option value="${issueType.id }" <c:if test="${expertEntity.expertType eq issueType.id}"> selected</c:if>>${issueType.issueTypeName }</option>
									</c:if>
		                        </c:forEach>
		                    </select>
		                </div>
		            </div>
		            </div>
					
		           
		            <div class="weui-cell">
		                <div class="weui-cell__hd"><label class="weui-label">文章名称</label></div>
		                <div class="weui-cell__bd">
		                    <input class="weui-input" type="text" required placeholder="请输入文章名称" name="name" id="name" value="${expertEntity.name}"/>
		                </div>
		            </div>
		            
		          <div class="weui-cell">
		                <div class="weui-cell__bd">
		                    <textarea class="weui-textarea" required placeholder="请输入文章内容" rows="3" name="describe" onkeydown="checkSize(this)" id="describe" >${expertEntity.describe}</textarea>
		                </div>
		            </div>
		        <div class="button-sp-area">
					<input type="button" class="weui-btn weui-btn_primary" value="提交">
		        </div>
			</form>
	        </div>
              </div>

            </div>

          </div>

        </div>
      </div>
 <!--底部-->
    <div data-am-widget="navbar" class="am-navbar am-cf my-nav-footer " id="">
     <ul class="am-navbar-nav am-cf am-avg-sm-4 my-footer-ul">
		<li>
           <a href="${ctx }/user/findUserIssue?issueTypeId=0" class="">
            <span class="am-icon-home"></span>
            <span class="am-navbar-label">首页</span>
          </a>
        </li>
        <li>
          <a href="${ctx }/issueType/findAll?mark=service&openId=<%=openId %>" class="">
            <span class="am-icon-comments"></span>
            <span class="am-navbar-label">提问</span>
          </a>
        </li>
		<li>
          <a href="${ctx }/postType/findAllPostType" class="">
            <span class="am-icon-book"></span>
            <span class="am-navbar-label">学习</span>
          </a>
        </li>
        <li style="position:relative">
          <a href="${ctx }/user/findByOpenId?openId=<%=openId %>" class="">
            <span class="am-icon-user"></span>
            <span class="am-navbar-label">我的</span>
          </a>
        </li>
      </ul>
</div>
    <script src="../js/text-calculation.js"></script>
</body>
  </html>